]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
calendar: Minor cleanup
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 2 Jun 2015 13:46:37 +0000 (15:46 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 5 Aug 2015 15:33:19 +0000 (17:33 +0200)
Add a constant for the icon size used in message list entries rather
than hardcoding it twice.

https://bugzilla.gnome.org/show_bug.cgi?id=749958

js/ui/calendar.js

index b571e4c6b4e417c0671065d34d27d34a67c19c21..64b68718bc387ad7e7f3d440386a559eedf2a538 100644 (file)
@@ -24,6 +24,8 @@ const MSECS_IN_DAY = 24 * 60 * 60 * 1000;
 const SHOW_WEEKDATE_KEY = 'show-weekdate';
 const ELLIPSIS_CHAR = '\u2026';
 
+const MESSAGE_ICON_SIZE = 48;
+
 const MESSAGE_ANIMATION_TIME = 0.1;
 
 const DEFAULT_EXPAND_LINES = 6;
@@ -1240,9 +1242,10 @@ const NotificationMessage = new Lang.Class({
 
     _getIcon: function() {
         if (this.notification.gicon)
-            return new St.Icon({ gicon: this.notification.gicon, icon_size: 48 });
+            return new St.Icon({ gicon: this.notification.gicon,
+                                 icon_size: MESSAGE_ICON_SIZE });
         else
-            return this.notification.source.createIcon(48);
+            return this.notification.source.createIcon(MESSAGE_ICON_SIZE);
     },
 
     _onUpdated: function(n, clear) {